package vns.client.event;

import com.google.gwt.event.shared.GwtEvent;

public class RuleActionEvent extends GwtEvent<RuleActionEventHandler> {

	public static Type<RuleActionEventHandler> TYPE = new Type<RuleActionEventHandler>();
	private String ruleID = null;
	
	public RuleActionEvent (String ruleID){
		this.setRuleID(ruleID);
	}
	
	@Override
	public Type<RuleActionEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(RuleActionEventHandler handler) {
		handler.onRuleCondition(this);
	}

	public void setRuleID(String ruleID) {
		this.ruleID = ruleID;
	}

	public String getRuleID() {
		return ruleID;
	}

}
